package com.neusoft.elm.dao;

import com.neusoft.elm.po.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrdersDao {

    //注意：此方法会返回生成的主键
     int saveOrders(Orders orders) throws Exception;
    @Select("select * from orders where orderId=#{orderId}")
     Orders getOrdersById(Integer orderId) throws Exception;
    @Select("select * from orders where userId=#{userId} ")
     List<Orders> listOrdersById(String userId) throws Exception;
}
